export default {
  namespaced: true,
  state: {
    count: 2
  },
  getters: {
    getcount (State) {
      return State.count
    }
  },
  mutations: {
    add (State) {
      State.count++
    },
    jian (State, num) {
      State.count -= num
    }
  },
  actions: {
    jian ({commit}, num) {
      setTimeout(() => {
        console.log(num.num)
        commit('jian', num.num)
      }, 2000)
    }
  }
}
